<?php

namespace app\common\model;

/**
 * [StrikeBellLog  撞钟表]
 * @author [C。]
 * @return html
 */
class StrikeBellLog extends Base
{
    protected $name = 'strike_bell_log';
    /**
     * 根据搜索条件信息
     */
    public function getlists($map,$from = 0, $size = 5,$field = '*')
    {
        $order = ['c.id' => 'desc'];
        $join = [
            ['app_member m','m.id = c.mid'],
        ];
        $result =  $this->field($field)
            ->alias('c')
            ->join($join)
            ->where($map)
            ->order($order)
            ->limit($from, $size)
            ->select();

        return $result;
    }
    /**
     * 根据搜索条件列表信息
     */
    public function getCounts($map)
    {
        $join = [
            ['app_member m','m.id = c.mid'],
        ];
        $result =  $this
            ->alias('c')
            ->join($join)
            ->where($map)
            ->count();

        return $result;
    }
}